﻿@model IEnumerable<ADShop.Models.FirstOrderProduct>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

@*<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.IDOrderProduct)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.IDUsers)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TotalPriceOrder)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Active)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.IDOrderProduct)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IDUsers)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TotalPriceOrder)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Active)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
            @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
            @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
        </td>
    </tr>
}

</table>*@
@*<p>
    @Html.ActionLink("Create New", "Create", null, new { @class = "btn btn-green" })
</p>*@

<div class="panel panel-default">
    <div class="panel-heading">
        <i class="fa fa-external-link-square"></i>
        Danh Mục Sản Phẩm
        <div class="panel-tools">
            <a class="btn btn-xs btn-link panel-collapse collapses" href="#">
            </a>
            <a class="btn btn-xs btn-link panel-config" href="#panel-config" data-toggle="modal">
                <i class="fa fa-wrench"></i>
            </a>
            <a class="btn btn-xs btn-link panel-refresh" href="#">
                <i class="fa fa-refresh"></i>
            </a>
            <a class="btn btn-xs btn-link panel-expand" href="#">
                <i class="fa fa-resize-full"></i>
            </a>
            <a class="btn btn-xs btn-link panel-close" href="#">
                <i class="fa fa-times"></i>
            </a>
        </div>
    </div>
    <div class="panel-body">
        <table class="table table-hover" id="sample-table-1">
            <thead>
                <tr>
                    <th>
                        @Html.DisplayNameFor(model => model.IDOrderProduct)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.IDUsers)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.TotalPriceOrder)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Active)
                    </th>
                    <th>Chức Năng</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var items in Model)
                {
                    <tr>
                        <td>@items.IDOrderProduct</td>
                        <td>@items.Member.UserEmail</td>
                        <td>@items.TotalPriceOrder</td>
                        <td>
                            @items.Active
                        </td>
                        <td>
                            @Html.ActionLink("Sửa", "Edit", new { id = @items.IDOrderProduct }, new { @class = "label label-warning" })
                            @Html.ActionLink("Xem", "Details", new { id = @items.IDOrderProduct }, new { @class = "label label-warning" })
                            @Html.ActionLink("Xóa", "DeleteConfirmed", new { id = @items.IDOrderProduct}, new { @class = "label label-danger", onclick = "return confirm('Are you sure to delete this item?')" })
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>

